/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.japo.java.swing.igu;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.HeadlessException;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class IGU extends JFrame {

    public IGU() throws HeadlessException {
        iniciarComponentes();
    }

    private void iniciarComponentes() {

        //Fuente
        Font f = new Font("Calibri", Font.BOLD, 80);

        //Etiqueta
        JLabel lblRotulo = new JLabel();
        lblRotulo.setText("EN VENTA");
        lblRotulo.setForeground(Color.WHITE);
        lblRotulo.setBackground(Color.BLUE);
        lblRotulo.setOpaque(true);
        lblRotulo.setFont(f);
        lblRotulo.setHorizontalAlignment(JLabel.CENTER);

        //Panel princpal
        JPanel pnlPrincipal = new JPanel(new BorderLayout());
        pnlPrincipal.add(lblRotulo, BorderLayout.CENTER);

        // Ventana
        setContentPane(pnlPrincipal);
        setSize(400, 300);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setTitle("Etiqueta");

    }

}
